

<%@ page import="com.ContasCorrente" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="main" />
        <g:set var="entityName" value="${message(code: 'contasCorrente.label', default: 'ContasCorrente')}" />
        <title><g:message code="default.edit.label" args="[entityName]" /></title>
    </head>
    <body>
        <div class="nav">
            <span class="menuButton"><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a></span>
            <span class="menuButton"><g:link class="list" action="list"><g:message code="default.list.label" args="[entityName]" /></g:link></span>
            <span class="menuButton"><g:link class="create" action="create"><g:message code="default.new.label" args="[entityName]" /></g:link></span>
        </div>
           <h1 id="pageName">Altera ContasCorrente</h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <g:hasErrors bean="${contasCorrenteInstance}">
            <div class="errors">
                <g:renderErrors bean="${contasCorrenteInstance}" as="list" />
            </div>
            </g:hasErrors>
            <g:form method="post" >
                <g:hiddenField name="id" value="${contasCorrenteInstance?.id}" />
                <g:hiddenField name="version" value="${contasCorrenteInstance?.version}" />
                    <table class="IadTableForm">
                        <tbody>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="banco"><g:message code="contasCorrente.banco.label" default="Banco" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: contasCorrenteInstance, field: 'banco', 'errors')}">
                                    <g:textField name="banco" value="${contasCorrenteInstance?.banco}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="numero"><g:message code="contasCorrente.numero.label" default="Numero" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: contasCorrenteInstance, field: 'numero', 'errors')}">
                                    <g:textField name="numero" value="${contasCorrenteInstance?.numero}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="agencia"><g:message code="contasCorrente.agencia.label" default="Agencia" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: contasCorrenteInstance, field: 'agencia', 'errors')}">
                                    <g:textField name="agencia" value="${contasCorrenteInstance?.agencia}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="descricao"><g:message code="contasCorrente.descricao.label" default="Descricao" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: contasCorrenteInstance, field: 'descricao', 'errors')}">
                                    <g:textArea name="descricao" cols="40" rows="5" value="${contasCorrenteInstance?.descricao}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="contaContabil"><g:message code="contasCorrente.contaContabil.label" default="Conta Contabil" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: contasCorrenteInstance, field: 'contaContabil', 'errors')}">
                                    <g:select name="contaContabil.id" from="${com.ContaContabil.list()}" optionKey="id" value="${contasCorrenteInstance?.contaContabil?.id}"  />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="contasPagar"><g:message code="contasCorrente.contasPagar.label" default="Contas Pagar" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: contasCorrenteInstance, field: 'contasPagar', 'errors')}">
                                    <g:select name="contasPagar" from="${com.ContasPagar.list()}" multiple="yes" optionKey="id" size="5" value="${contasCorrenteInstance?.contasPagar*.id}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="contasReceber"><g:message code="contasCorrente.contasReceber.label" default="Contas Receber" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: contasCorrenteInstance, field: 'contasReceber', 'errors')}">
                                    <g:select name="contasReceber" from="${com.ContasReceber.list()}" multiple="yes" optionKey="id" size="5" value="${contasCorrenteInstance?.contasReceber*.id}" />
                                </td>
                            </tr>
                        
                        </tbody>
                    </table>
                <div class="buttons">
                    <span class="button"><g:actionSubmit class="save" action="update" value="${message(code: 'default.button.update.label', default: 'Update')}" /></span>
                    <span class="button"><g:actionSubmit class="delete" action="delete" value="${message(code: 'default.button.delete.label', default: 'Delete')}" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" /></span>
                </div>
            </g:form>
    </body>
</html>
